package com.xijia.wuyouwallet.pref;

import android.content.Context;

import com.xijia.wuyouwallet.config.AppConfig;
import com.xijia.wuyouwallet.config.FusionCode;

/**
 * Created by Administrator on 2017/11/18 0018.
 */

public class ZcUserPref extends BasePref {

    public ZcUserPref(){
        mSharedPref = mContext.getSharedPreferences(AppConfig.PreferenceModule.WALLET_PREF_USER,
                Context.MODE_PRIVATE);
    }

    public void setFirstOpenFalse() {
        putBooleanKey(AppConfig.PreferenceUser.IS_FIRST_OPEN, false);
    }

    public boolean getIsFirstOpen() {
        return getBooleanKeyDefaultTrue(AppConfig.PreferenceUser.IS_FIRST_OPEN);
    }


    public void putLogonPwd(String pwd) {
        putStringKey(AppConfig.PreferenceUser.LOGON_USER_PWD,pwd);
    }

    public String getLogonPwd() {
        return getDefaultStringKey(AppConfig.PreferenceUser.LOGON_USER_PWD, FusionCode.EMT_STR);
    }


    public void putLogonPhone(String phone) {
        putStringKey(AppConfig.PreferenceUser.LOGON_USER_PHONE,phone);
    }

    public String getLogonPhone() {
        return getDefaultStringKey(AppConfig.PreferenceUser.LOGON_USER_PHONE, FusionCode.EMT_STR);
    }

    public boolean getSelfMotionLogin() {
        return getBooleanKeyDefaultFalse(AppConfig.PreferenceUser.IS_SELFMOTION_LOGIN);
    }

    public void setSelfMotionLoginT(){
        putBooleanKey(AppConfig.PreferenceUser.IS_SELFMOTION_LOGIN, true);
    }

    public void setSelfMotionLoginF(){
        putBooleanKey(AppConfig.PreferenceUser.IS_SELFMOTION_LOGIN, false);
    }




}
